<?php
    $path_one = 'admin/admin_system';
    $path_two = 'admin/manage_config';
    require_once("header.php");
    require_once("admin_comm.php");
    require_once $_site->get_handlepath('admin_config');
    //获取配置列表数据集
    $tmp = admin_config_fun_list();

    $rows = array();
    if($tmp){
        foreach($tmp as $k=>$v){
            $rows[$v['k']] = $v;
        }
    }
?>
<script type="text/javascript" charset="utf-8">
    loader.file({
        plugin:['validform/main'],
        skincss:['list']
    });
    window.onload = function(){

        $("#form1").Validform({
            tiptype: function(msg, o, cssctl){
                if(!o.obj.is("form")){
                    var obj = o.obj.siblings("span");
                    cssctl(obj, o.type);
                    obj.text(msg);
                }
            },
            postonce:true
        });
    }
</script>
</head>

<body>
    <div class="position_nav">你所在的当前位置：<?php echo $path_str;?></div>
    <div class="main">

        <!--[if !IE]>内容区<![endif]-->
        <form action="/handle.php" method="post" id="form1">
            <input type="hidden" name="h" value="admin_config/update">
            <div class="list_show">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <th width="2%" align="center">&nbsp;</th>
                        <th width="9%">名称</th>
                        <th width="53%" align="left">值</th>
                        <th width="36%" align="left">说明</th>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">网站域名：</td>
                        <td>
                            <input type="text" class="w355" name="url" value="<?php echo $rows['url']['v'];?>" size="50" datatype="*1-50" errormsg="域名不能超过100个字" nullmsg="域名不能为空">
                            <span></span>
                        </td>
                        <td><?php echo $rows['url']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">网站标题：</td>
                        <td>
                            <input type="text" name="title" class="w355" value="<?php echo $rows['title']['v'];?>" size="50" datatype="*1-100" errormsg="网站标题不能超过100个字" nullmsg="网站标题不能为空">
                            <span></span>
                        </td>
                        <td><?php echo $rows['title']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">关键词语：</td>
                        <td>
                            <textarea name="keywords" class="w355" cols="41" datatype="*1-100" errormsg="关键字不能超过100个字" nullmsg="关键字不能为空"><?php echo $rows['keywords']['v'];?></textarea>
                            <span></span>
                        </td>
                        <td><?php echo $rows['keywords']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">网站描述：</td>
                        <td>
                            <textarea name="description" class="w355" cols="41" datatype="*1-255" errormsg="网站描述不能超过255个字" nullmsg="网站描述不能为空"><?php echo $rows['description']['v'];?></textarea>
                            <span></span>
                        </td>
                        <td><?php echo $rows['description']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">备案信息：</td>
                        <td>
                            <input type="text" class="w355" name="beian" value="<?php echo $rows['beian']['v'];?>"  datatype="*1-255" errormsg="备案信息不能超过255个字" nullmsg="备案信息不能为空">
                            <span></span>
                        </td>
                        <td><?php echo $rows['beian']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">版权信息：</td>
                        <td>
                            <input type="text" class="w355" name="right" datatype="*1-255" errormsg="版权信息不能超过255个字" nullmsg="版权信息不能为空" value="<?php echo $rows['right']['v'];?>">
                            <span></span>
                        </td>
                        <td><?php echo $rows['right']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">支持系统：</td>
                        <td>
                            <input type="text" class="w355" name="zcxt_site" datatype="url" errormsg="链接地址不正确" nullmsg="" value="<?php echo $rows['zcxt_site']['v'];?>">
                            <span></span>
                        </td>
                        <td><?php echo $rows['zcxt_site']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">统计代码：</td>
                        <td>
                            <textarea name="statistics" class="w355" cols="41"><?php echo $rows['statistics']['v'];?></textarea>
                            <span></span>
                        </td>
                        <td><?php echo $rows['statistics']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">说明-首页：</td>
                        <td>
                            <input type="text" name="title_index" class="w355" value="<?php echo $rows['title_index']['v'];?>" datatype="*" errormsg="首页说明在30个字以内">
                            <span></span>
                        </td>
                        <td><?php echo $rows['title_index']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">说明-公告：</td>
                        <td>
                            <input type="text" name="title_notice" class="w355" value="<?php echo $rows['title_notice']['v'];?>" datatype="*" errormsg="公告说明在30个字以内">
                            <span></span>
                        </td>
                        <td><?php echo $rows['title_notice']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">说明-生活百事：</td>
                        <td>
                            <input type="text" name="title_life" class="w355" value="<?php echo $rows['title_life']['v'];?>" datatype="*" errormsg="生活百事说明在30个字以内">
                            <span></span>
                        </td>
                        <td><?php echo $rows['title_life']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">说明-直供超市：</td>
                        <td>
                            <input type="text" name="title_shop" class="w355" value="<?php echo $rows['title_shop']['v'];?>" datatype="*" errormsg="直供超市说明在30个字以内">
                            <span></span>
                        </td>
                        <td><?php echo $rows['title_shop']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">说明-邻里互动：</td>
                        <td>
                            <input type="text" name="title_linli" class="w355" value="<?php echo $rows['title_linli']['v'];?>" datatype="*0-30" errormsg="邻里互动说明在30个字以内">
                            <span></span>
                        </td>
                        <td><?php echo $rows['title_linli']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">打卡所得积分：</td>
                        <td>
                            <input type="text" name="money_card" class="w355" value="<?php echo $rows['money_card']['v'];?>" datatype="n" errormsg="请输入整数">
                            <span></span>
                        </td>
                        <td><?php echo $rows['money_card']['descript'];?></td>
                    </tr>

                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">领取摇奖次数</td>
                        <td>
                            <input type="text" name="rock_num" class="w355" value="<?php echo $rows['rock_num']['v'];?>" datatype="n" errormsg="请输入整数">
                            <span></span>
                        </td>
                        <td><?php echo $rows['rock_num']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">推荐用户积分：</td>
                        <td>
                            <input type="text" name="recommend_money" class="w355" value="<?php echo $rows['recommend_money']['v'];?>" datatype="n" errormsg="请输入整数">
                            <span></span>
                        </td>
                        <td><?php echo $rows['recommend_money']['descript'];?></td>
                    </tr>
                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="right">商家有效时间：</td>
                        <td>
                            <input type="text" name="company_agree_year" class="w355" value="<?php echo $rows['company_agree_year']['v'];?>" datatype="n" errormsg="请输入整数">
                            <span></span>
                        </td>
                        <td><?php echo $rows['company_agree_year']['descript'];?></td>
                    </tr>

                    <tr>
                        <td align="center">&nbsp;</td>
                        <td align="center">&nbsp;</td>
                        <td align="left"><input type="submit" value="保存" class="inputbut"></td>
                        <td>&nbsp;</td>
                    </tr>
                </table>
            </div>
        </form>
        <!--[if !IE]>end<![endif]-->

    </div>
	</body>
</html>